package tsing.javase.ftp;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.validation.constraints.Size;

/**
 * @Date 2023/8/31 9:34
 * FTP 配置类 :使用@ConfigurationProperties 注解获取配置
 * 还可以使用@Value("${}")注解
 */
@Component
@ConfigurationProperties(prefix = "ftp")
public class FtpConfig {
    @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
    private String host;
    private String port;
    private String username;
    private String password;
    private String remotepath;
    private String localpath;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRemotepath() {
        return remotepath;
    }

    public void setRemotepath(String remotepath) {
        this.remotepath = remotepath;
    }

    public String getLocalpath() {
        return localpath;
    }

    public void setLocalpath(String localpath) {
        this.localpath = localpath;
    }
}
